export default class NameUtil {
  static camelCase(...parts) {
    if (parts.length === 0) {
      return ''
    }
    if (parts.length === 1) {
      return parts[0]
    }
    for (let i = 1; i < parts.length; i++) {
      parts[i] = this.upperCaseFirstLetter(parts[i])
    }
    return parts.join('')
  }

  static upperCaseFirstLetter(name) {
    return name.substr(0, 1).toUpperCase() + name.substr(1)
  }

  static lowerCaseFirstLetter(name) {
    return name.substr(0, 1).toLowerCase() + name.substr(1)
  }
}
